﻿namespace vKapse.VirtualDesktop.Core.UI
{

	using System;
	using System.Collections.Generic;
	using System.ComponentModel;
	using System.Data;
	using System.Drawing;
	using System.Text;
	using System.Windows.Forms;
	using System.Diagnostics;

	internal partial class AddShareForm : Form
	{
		public AddShareForm()
		{
			InitializeComponent();
			this.Load += new EventHandler(AddShareForm_Load);
		}

		void AddShareForm_Load(object sender, EventArgs e)
		{
			this.Load -= new EventHandler(AddShareForm_Load);
			Process[] processes = Process.GetProcesses();
			this.cbShareList.BeginUpdate();
			foreach (Process process in processes)
			{
				if (process.MainWindowHandle == IntPtr.Zero || process.MainWindowHandle == null ||
					process.MainModule == null)
				{
					continue;
				}
				this.cbShareList.Items.Add(process.MainModule.ModuleName);
			}
			this.cbShareList.EndUpdate();
		}

		internal string ProcessName
		{
			get
			{
				return this.cbShareList.Text.Trim();
			}
		}


	}
}
